<template>
	<div class="container">
		<bs-input type="textarea" :value.sync="introduction" placeholder="请输入个人简介……"></bs-input>
		<sure-button @click="submit()"></sure-button>
	</div>
</template>
<script>
	import SureButton from './../public/SureButton'
	import BsInput from 'vue-strap/src/input'
	import {updateUserIntroduction} from './../../vuex/action'
	export default {
		components: {
			SureButton,
			BsInput
		},
		vuex: {
			getters: {
				sintroduction: function (state) {
					return state.user.introduction
				}
			},
			actions: {
				updateUserIntroduction
			}
		},
		data: function () {
			return {
				introduction: this.sintroduction
			}
		},
		methods: {
			submit: function () {
				this.updateUserIntroduction(this.introduction)
			}
		}
	}
</script>
<style scoped>
	.container {
		padding: 15px 15px;
	}
	textarea {
		width: 100%;
		height: 40px;
		border: none;
		outline: none;
		background-color: #ccc;
		padding:5px 20x;
	}
</style>